<template>
  <div class="contract-wrap">
    <div class="top-btn-wrap">
      <el-button icon="el-icon-plus" @click="addContract()">新建合同</el-button>
    </div>

    <div class="listTable">
      <el-table :data="tableData" stripe @selection-change="selectionChange">
        <el-table-column :selectable="selectableFun" show-overflow-tooltip type="selection" align="center" width="55" />
        <el-table-column v-for="(item, index) in headList" :key="index" :prop="item.prop" :label="item.label"
          :min-width="item.width" show-overflow-tooltip>
          <template slot-scope="{ row, column, $index }">
            <template v-if="item.prop == 'name'">
              <span style="color: blue;" @click="btnName" >AAA</span>

            </template>
          </template>
        </el-table-column>
      </el-table>
    </div>
    <!-- 客户info -->
    <seaDrawer ref="seaDrawer"/>
  </div>
</template>
<script>
import seaDrawer from '@/components/busComponents/tabDrawer/seaDrawer.vue'
export default {
  name: 'contract',
  components: { seaDrawer },
  data () {
    return {
      tableData: [
        {
          lastTime: "",
          createUserId: "1685860863323926528",
          num: "20230803-0001",
          businessName: "",
          businessId: "",
          fliedXucqai: "",
          receivedProgress: 0.0000,
          remark: "",
          createUserName: "admin",
          ownerDeptId: "1685860863307149312",
          contactsName: "",
          checkStatus: 1,
          unreceivedMoney: 111,
          customerId: "1686986400352063488",
          contactsId: "",
          companyUserName: "admin",
          ownerUserName: "admin",
          startTime: "",
          ownerDeptName: "admin",
          star: 0,
          companyUserId: "1685860863323926528",
          updateTime: "2023-08-03 15:34:04",
          customerName: "q",
          money: 111.00,
          createTime: "2023-08-03 15:34:04",
          teamMemberIds: "",
          name: "选择不进入公海客户",
          ownerUserId: "1685860863323926528",
          contractId: "1687003887290437632",
          endTime: "",
          orderDate: "2023-08-03",
          receivedMoney: 0
        }
      ],
      headList: [
        { prop: "name", width: "120", label: "合同名称" },
        { prop: "invoiceTitle", width: "120", label: "合同编号" },
        { prop: "taxNumber", width: "120", label: "客户名称" },
        { prop: "depositBank", width: "120", label: "合同金额(元)" },
        { prop: "depositAccount", width: "120", label: "开始日期" },
        { prop: "depositAddress", width: "120", label: "结束日期" },
        { prop: "telephone", width: "120", label: "状态" },
      ]
    }
  },
  methods: {
    addContract () {

    },
    selectionChange () {

    },
    selectableFun () {

    },
    btnName(){
      this.$refs.seaDrawer.show();
    },
  }
}
</script>
<style lang="scss" scoped>
.contract-wrap {
  .top-btn-wrap {
    text-align: right;
    margin-bottom: 16px;
  }
}
</style>